package se.hrbustrc.hlgshopping.service;

import se.hrbustrc.hlgshopping.entity.OrderInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import se.hrbustrc.hlgshopping.utils.Result;
import se.hrbustrc.hlgshopping.vo.OrderVO;
import se.hrbustrc.hlgshopping.vo.OrderRequestVO;

public interface OrderInfoService extends IService<OrderInfo> {
    Result addOrder(OrderVO orderVO);

    Result addOrder(OrderRequestVO orderRequestVO, Long userId);

    Result deleteOrder(int orderId);

    Result upOrderState(Long id,Integer orderState);

    OrderInfo getOrder(Long id);

    /**
     * 根据订单编号获取订单
     * @param orderNo 订单编号
     * @return OrderInfo 订单信息
     */
    OrderInfo getOrderByNo(String orderNo);

    /**
     * 获取订单详情（包含订单信息和订单明细）
     * @param orderId 订单ID
     * @return OrderVO 订单详情
     */
    OrderVO getOrderDetail(Long orderId);
}
